/**********************************************************************/
/**  Copyright (c) ECC labs. 2001-2002. All Rights Reserved.         **/
/**********************************************************************/
/*
	some functions on families info & tensor products sums  etc.
*/

#ifndef BINCODE_H
	#define BINCODE_H
	#include "bincode.h"
#endif

#ifndef BINOM_H
	#define BINOM_H
	#include "binom.h"
#endif

#include <string>
#include <fstream.h>
#include <stdlib.h>

#define MAX_STRINGS 256
#define MAX_STR_LEN 256
#define MAX_FAM_MEMB 64

typedef struct {
			int     k[MAX_FAM_MEMB],
					n[MAX_FAM_MEMB],
					sec,
					all ;
		} t_code_family ;

typedef struct {
	 //     long    num ;
			int     its_k ;
			int     its_d ;
			int     sum_k ;
			int     sum_d ;
		} t_conf_data ;

int filter( char *filename, CBinCode* C, CBinCode* D ) ;
int conf_calc ( CBinCode *C, t_conf_data *rs, int s ) ;

////////// Tensor product's sum dimention calc //////////////////
int tp_dim ( t_conf_data *rs_C, t_conf_data *rs_D, int s )  ;

///////// Tensor product's sum distance upper bound calc ///////
int tp_bound ( t_conf_data *rs_C, t_conf_data *rs_D, int s ) ;

///////// Tensor products sum calculation //////////////////////
 CBinCode& tp (CBinCode* &C, CBinCode* &D, int s) ;

///////// Tensor products sum calculation //////////////////////
CBinCode tpsum(CBinCode*, CBinCode*, int) ;

/////// gets code nfo from a file //////
CBinCode& code_init( char* ) ;

/////////// sorts code's G matrix (increasing wights) //////////
void sort_( CBinCode& ) ;

////////// linear independence checker & improver ////////////////////////
CBinWord indep(CBinCode&) ;

/////// my change /////////////////
/////// Инициализация генератора случайных чисел случайным начальным значением
int randomize () ;
